import React, { useState } from 'react';
import { Col, Row } from 'antd';
import { useAccess, useModel } from '@umijs/max';
import { PageContainer } from '@ant-design/pro-components';
import ConductTopicObserver from './components/conductTopicObserver';
import ActivityArticleObserver from './components/activityArticleObserver';
import CardTitle from '@/components/CardTitle';
import ConductTopicMedia from './components/conductTopicMedia';
import ActivityTopicArticle from './components/activityTopicArticle';
import ActivityActiveArticle from './components/activityActiveArticle';
import ConductTopicSupplier from './components/conductTopicSupplier';
import BulletinBoard from './components/bulletinBoard';
import RankModule from './components/RankModule';
import CalendarModule from './components/CalendarModule';
// import './style.less'
export default (): React.ReactNode => {
  const access = useAccess();

  const { initialState } = useModel('@@initialState');
  const { currentUser } = initialState || {};

  return <>
    <PageContainer
      header={{
        title: false,
        breadcrumb: {},
      }}
    >
      <CalendarModule></CalendarModule>
      <Row gutter={24}>
        <Col xl={17} lg={24} md={24} sm={24} xs={24}>
          {access.线索征集x配置x管理员 && <ConductTopicObserver />}
          {access.线索征集x配置x管理员 &&
            <ActivityArticleObserver
              title={<CardTitle>市级部门 - 选题线索报送动态</CardTitle>}
              type="6000000000700000"
            />
          }
          {access.线索征集x配置x管理员 &&
            <ActivityArticleObserver
              title={<CardTitle>区县 - 选题线索报送动态</CardTitle>}
              type="6000000000900000"
            />
          }

          {access.线索征集x配置x媒体需求者 && <ConductTopicMedia />}

          {access.线索征集x配置x媒体需求者 &&
            <ActivityTopicArticle title={<CardTitle>选题计划报送动态</CardTitle>} type={undefined} />
          }
          {access.线索征集x配置x媒体需求者 &&
            <ActivityActiveArticle title={<CardTitle>主动报送动态</CardTitle>} type={undefined} />
          }

          {access.线索征集x配置x提供者 &&
            <ConductTopicSupplier />
          }
          {access.线索征集x配置x提供者 &&
            <ActivityTopicArticle title={<CardTitle>选题计划报送动态</CardTitle>} type={undefined} />
          }
          {access.线索征集x配置x提供者 &&
            <ActivityActiveArticle title={<CardTitle>主动报送动态</CardTitle>} type={undefined} />
          }
        </Col>

        <Col xl={7} lg={24} md={24} sm={24} xs={24}>
          {access.宣传指令x页面 &&
            <BulletinBoard />
          }
          <RankModule />
        </Col>
      </Row>
      {/* <div className='chat'>
        <div className='main' >
          <span>怎么重置秘密?</span>
        </div>
        <div className='other'></div>
      </div> */}
    </PageContainer >
  </>;
};
